module.exports = function(sequelize, DataTypes) {
    var CategoryOption = sequelize.define('CategoryOption', {
        _id: {
            type: DataTypes.INTEGER(11),
            allowNull: false,
            primaryKey: true,
            autoIncrement: true
        },
        type: {
            type: DataTypes.TEXT,
            allowNull: false,
            field: "type",
            comment: "位置|环境|物业|门禁"
        },
        environment: {
            type: DataTypes.TEXT,
            allowNull: false,
            field: "environment",
            comment: "居住|办公|经营"
        },
        desc: {
            type: DataTypes.TEXT,
            allowNull: false,
            field: "desc",
            comment: "描述"
        },
        img: {
            type: DataTypes.TEXT,
            allowNull: false,
            field: "img",
            comment: "图片"
        },
        cameraNum: {
            type: DataTypes.INTEGER,
            defaultValue: 0
        },
        lockNum: {
            type: DataTypes.INTEGER,
            defaultValue: 0
        },
        detectNum: {
            type: DataTypes.INTEGER,
            defaultValue: 0
        },
        warnNum: {
            type: DataTypes.INTEGER,
            defaultValue: 0
        },
        handNum: {
            type: DataTypes.INTEGER,
            defaultValue: 0
        }
    }, {
        timestamps: false,
        tableName: 'categoryOption'
    });
    return CategoryOption;
}